﻿<div class="dialog-container mdl-shadow--8dp mdl-layout--fixed-header SMES-dialog LineChange-dialog" ng-init="init();" style="background-color: #fafafa">
    <div class="kmi-header-row">
        <div class="header-title" ng-bind="'LineChange.title' | translate"></div>
        <div class="kmi-side-btn right" ng-click="dialog.back();">
            <i class="material-icons">clear</i>
            <div class="kmi-can-click"></div>
        </div>
    </div>
    <div class="kmi-layout-main-content">
        <div class="kmi-layout-page">
            <div>
                <div class="kmi-text-fields">
                    <label class="label" ng-bind="'LineChange.line_' | translate"></label>
                    <label class="value" ng-bind="dialog.machine.machine_display"></label>
                </div>
                <div class="equipment-status">
                    <div class="kmi-text-fields" style="flex: 1;">
                        <label class="label" ng-bind="'LineChange.line_status' | translate"></label>
                        <label class="value" style="flex: initial;" ng-bind="'common.machine.status.'+dialog.machine.machine_status | translate"></label>
                        <button class="mdl-button mdl-js-button mdl-button--icon" ng-if="dialog.showMaintainOrder();"
                                style="width: 24px; margin-right: 6px; background: #1ab7cd; border-radius: 4px; margin-left: 8px;">
                            <i class="material-icons" style="color: #ffffff;">assignment</i>
                            <div class="kmi-can-click" ng-click="dialog.openMaintainOrder();"></div>
                        </button>
                    </div>
                    <div class="kmi-text-fields" style="flex: 1;">
                        <label class="label" ng-bind="'LineChange.line_runtime' | translate"></label>
                        <label class="value" ng-bind="dialog.machine.machine_runtime"></label>
                    </div>
                </div>
                <!-- 202400322 add by Alan for M#160269: 補上#113735 -->
                <div class="kmi-text-fields" ng-show="dialog.machine.machine_status != 0 && dialog.machine.machine_status != 1 && dialog.machine.machine_status != 4 && dialog.flag">
                    <label class="label" ng-bind="('common.machine.status.'+dialog.machine.machine_status | translate)+('LineChange.reason' | translate)"></label>
                    <input class="value" ng-model="dialog.remark_name" readonly="readonly" ng-click="dialog.changeRemark();"></input>
                    <div class="tip"><i class="material-icons">&#xE5CF;</i></div>
                </div>
                <div class="kmi-text-fields" ng-class="{'hide-content':dialog.have_reason != '1'}">
                    <label class="label" ng-bind="('common.machine.status.'+dialog.machine_status | translate)+('LineChange.reason' | translate)"></label>
                    <!--<label class="value" ng-bind="dialog.remark_name"></label>-->
                    <input class="value" ng-model="dialog.remark_name" readonly="readonly" ng-click="dialog.changeRemark();"></input>
                    <div class="tip"><i class="material-icons">&#xE5CF;</i></div>
                </div>
                <div class="equipment-status">
                    <div class="kmi-text-fields" style="flex: 1;">
                        <label class="label" ng-bind="'LineChange.handle_user_no' | translate"></label>
                        <input class="value" id="handle_user_no" ng-model="dialog.handle_user_no"></input>
                        <div class="tip search" ng-click="dialog.loadHandleUserNoList();" style="padding-right: 10px;"><i class="material-icons">search</i></div>
                    </div>
                    <div class="kmi-text-fields" style="flex: 1;">
                        <label class="label" ng-bind="'LineChange.plan_start_time' | translate" ng-hide="dialog.machine_status=='0'||dialog.machine_status=='1'"></label>
                        <label class="label" ng-bind="'LineChange.actual_end_time' | translate" ng-show="dialog.machine_status=='0'||dialog.machine_status=='1'"></label>
                        <input class="value date" style="flex:0 0 108px;" mdl-datepicker="dialog.plan_work.date"></input>
                        <input class="value time" style="border-left: 0px;" mdl-timepicker="dialog.plan_work.time"></input>
                    </div>
                </div>
                <div class="kmi-text-fields" style="flex: 1;height:60px;">
                    <label class="label" ng-bind="'LineChange.remarks' | translate"></label>
                    <textarea class="value" ng-model="dialog.remarks"></textarea>
                </div>
            </div>
            <div class="btn-panel">
                <div class="kmi-button kmi-button-confrim" ng-class="{'is-select':dialog.machine_status == item.code}" style="width:100px"
                     ng-repeat="item in dialog.status_item">
                    <i class="material-icons">done</i>
                    <label ng-bind="'LineChange.machine.status.'+item.code | translate"></label>
                    <div class="kmi-can-click" ng-click="dialog.changeStatus(item);"></div>
                </div>
                <div class="kmi-button kmi-button-confrim btn-confirm" ng-click="dialog.confirm()">
                    <label ng-bind="'LineChange.confirm' | translate"></label>
                    <div class="kmi-can-click"></div>
                </div>
            </div>
        </div>
    </div>
</div>